<template>
<h1 class="container">{{ msg }}</h1>
<input type="text" v-model="msg">
</template>

<script lang='ts' setup name='App'>
import {ref,customRef} from "vue"
import useMsgRef from "./hooks/useMsgRef";
const {msg}=useMsgRef("祝你天天开心！",2000)
</script>

<style scoped>
.container{
  background-color: skyblue;
  padding: 30px;
  border-radius: 10px;
}
</style>